import $axios from "./api";

export const login = (data: object) => {
    return $axios({
        url: '/login',
        method: 'post',
        data: data
    })
}
export const create = (data: object) => {
    return $axios({
        url: '/create',
        method: 'post',
        data: data
    })
}
export const getArticles = () => {
    return $axios({
        url: '/getArticles',
        method: 'get'
    })
}
export const getContent = (data: object) => {
    return $axios({
        url: '/getContent',
        method: 'post',
        data: data
    })
}
export const deleteArticle = (data: object) => {
    return $axios({
        url: '/deleteArticle',
        method: 'post',
        data: data
    })
}

export const dianzan = (data: object) => {
    return $axios({
        url: '/dianzan',
        method: 'post',
        data: data
    })
}

export const publishComments = (data: object) => {
    return $axios({
        url: '/publishComments',
        method: 'post',
        data: data
    })
}